<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>	
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>职位发布登记</title>
    <link href="static/css/tail.css" rel="stylesheet" type="text/css" />
    <link href="static/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="${pageContext.request.contextPath }/static/css/bootstrap-treeview.min.css" />
	 <style>
        .tree_left{box-sizing:border-box;overflow-y: auto;width:19%;border: 1px #c1d3de solid;margin-right: 1%;border-top:none;}
        .tree_left h6,.tree_right h6{line-height: 30px;font-weight: bold;padding-left: 6px ;color: #000;font-size: 14px}
        .tree_left_top{margin: 6px}
        .tree_input input{border: 1px #ccc solid;margin:3px 0 0 10px;border-radius: 4px;
        }
        .layui-layer-title{background:url(images/righttitlebig.png) repeat-x;font-weight:bold;color:#46647e; border:1px solid #c1d3de;height: 33px;line-height: 33px;}
        .tabe_bot label{width: 70px;text-align: right;font-size: 14px;font-weight: 900;color: #46647e}
        .l_left{float: left}
        .tabe_bot input,.tabe_bot  select{width: 180px;height: 30px;border-radius: 6px;margin:0 20px 0 0;border: none;border: 1px #ccc solid}
        .tabe_btn{width: 60px;height: 30px;background-color: #68b86c;border: none;border-radius: 6px;color: #fff}

        div#rMenu {position:absolute; visibility:hidden; top:0; background-color: #99c9db;text-align: left;padding: 2px;z-index: 999}
        div#rMenu ul li{ margin: 1px 0;padding: 5px 15px;cursor: pointer;list-style: none outside none;background-color: #5a8cc4;color: #fff  }
        div#rMenu ul li:hover{color: #000;background-color: #ccc}
        #rMenu ul{margin: 0;padding: 0};
        .ztree_add_div {
            width:200px;
            height:100px;
            border:1px solid #cccccc;
            padding-top:10px;
            padding-bottom:10px;
            display:none;



        }
        .ztree_add_div p {

            padding-bottom:10px;
            padding-top:10px;
        }
        
		.bt {
				margin-top: 10px;
				width: 300px;
			}
		.btnn{width: 40px;height: 24px;background-color: #68b86c;border: none;border-radius: 6px;color: #fff;}	
        .bot_btn .btn{width: 40px;height: 24px;background-color: #68b86c;border: none;border-radius: 6px;color: #fff;margin-right: 15px;}
        .bot_btn .btn1{background-color: #c1d3de;border: none;border-radius: 6px;color: #000;margin-right: 0}
        .bot_btn{width: 100%;height: 30px;font-size:13px;text-align:center;}
        #department{
        	margin-left: 25px;
        }
    </style>
	
    <script type="text/javascript" src="static/js/jquery.js"></script>
    <script>
        function change() {
            var height01 = $(window).height();
            $(".top").css('height', height01 - 35+"px");
        }
    </script>
</head>

<body onload="Personload()">
<input type="text" id="path" hidden="hidden" name="path" value="${pageContext.request.contextPath }"/>
<div class="title"><h2>招聘管理》职位发布管理》职位发布登记</h2></div>
<div id="open_department" hidden="hidden">
	<div id="div"></div>
</div>

<form id="form_demo" method="post" action="${pageContext.request.contextPath }/rt_releaseaddsave.html">
<div class="top">
    <div>
        <div class="top_out">
            <table class="table" >
                <tbody>
                <tr>
                    <td>部门：</td>
                    <td  style="text-align: left">
                    <input type="text" id="rt_oz_name" name="rt_oz_name" readonly="true"><span><img onclick="oper()" src="${pageContext.request.contextPath }/static/img/u=2067561964,964120144&fm=26&gp=0.jpg" height="23px" width="23px"/></span>
                    </td>
                    <td>招聘类型：</td>
                    <td colspan = "2" style="text-align: left">
                    <select name="recritmentType" id="recritmentType">
								<option value="0">--请选择--</option>
								<option value="1">校园招聘</option>
								<option value="2">社会招聘</option>	
					</select>
                    </td>
                    <td>招聘人数：</td>
                    <td colspan = "2" style="text-align: left"><input type="text" class="long_text" id="recritmentNumber" name="recritmentNumber" value=""></td>
                </tr>
                <tr>
                    <td>职位名称：</td>
                    <td  style="text-align: left">
                   	<input type="text" id="rt_position_name" name="rt_position_name" readonly="true" value="">
                   		<input type="text" hidden="hidden"  name="re_positionId" id="re_positionId" value=""/>
                   		<span><img onclick="openlayer()" id="tt" src="${pageContext.request.contextPath }/static/img/u=2067561964,964120144&fm=26&gp=0.jpg" height="23px" width="23px"/></span>
                    </td>
                    <td>职位编码：</td>
                    <td colspan = "2" style="text-align: left"><input type="text" id="rt_position_code" readonly="true" name="rt_position_code" value=""></td>
                    <td>职位分类：</td>
                    <td colspan = "2" style="text-align: left"><input type="text" id="rt_p_classname" readonly="true" name="rt_p_classname" value=""></td>
                </tr>
                <tr>
                    <td>登记人：</td>
                    <td  style="text-align: left"><input type="text" class="long_text" id="registrant" name="registrant" value=""></td>
                    <td>登记时间：</td>
                    <td colspan = "2" style="text-align: left"><input type="text" id="registrantTiem" name="registrantTiem"></td>
                    <td>截止时间：</td>
                    <td colspan = "2" style="text-align: left"><input type="text" id="endingDate" name="endingDate"></td>
                </tr>
                <tr>
                    <td style="line-height: 140px">职位描述：</td>
                    <td colspan = "6" style="text-align: left"><textarea  style="width: 100%;height: 150px" id="description" name="description" value=""></textarea></td>
                </tr>
                <tr>
                    <td style="line-height: 140px">招聘要求：</td>
                    <td colspan = "6" style="text-align: left"><textarea  style="width: 100%;height: 150px" id="recritmentrequire" name="recritmentrequire" value=""></textarea></td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="bot_btn">
        <input class="btn" type="submit" value="保存" name="releAdd" id="releAdd"/>
        <button class="btn btn1"><a href="#" onClick="javascript :history.back(-1);" target="right">返回</a></button>
    </div>
</div>
</form>
	
	<div id="layerOpen" hidden="hidden">
	  <div class="l_left"><label>职位名称：</label><input type="text" id="position_name" name="position_name" placeholder="请输入职位名称"  id="user"></div>
        <div class="l_left"><label>职位编码：</label><input type="text" id="position_code" name="position_code" placeholder="请输入职位编码"  id="user"></div>              
        <div class="l_left" id="department">
        	<label>所属部门：</label>
        	<select id="department_Id" name="department_Id">
            	<c:if test="${depList != null }">
						   <option value="0">--请选择--</option>
						   <c:forEach var="dep" items="${depList}">
						   		<option <c:if test="${dep.id == department_Id }">selected="selected"</c:if>
						   		value="${dep.id}">${dep.oz_name}</option>
						   </c:forEach>
						</c:if>
        	</select>
        </div>
     <button class="tabe_btn " onclick="getData()">查询</button>
     <div class="bt">
		   	 <button type="button" class="btnn" id="close">确定</button>
		     <button class="btnn" onClick="javascript :history.back(-1);" target="right">返回</button>
		 </div>
    <table id="open" class="table_style"></table>
</div>
	
	
	
</body>
<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/bootstrap-treeview.min.js" ></script>
<script src="${pageContext.request.contextPath }/static/js/recruitment/path.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/jquery.js"></script>
<script src="${pageContext.request.contextPath }/static/js/recruitment/releasejopadd.js"></script>
<script src="${pageContext.request.contextPath }/static/js/recruitment/openlayer.js"></script>
<script src="${pageContext.request.contextPath }/static/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath }/static/js/bootstrap-table.js"></script>
<script src="${pageContext.request.contextPath }/static/js/bootstrap-table-zh-CN.min.js"></script>
<script src="${pageContext.request.contextPath }/static/js/date/js/laydate.js"></script>
<script src="${pageContext.request.contextPath }/static/js/layer_v2.1/layer/layer.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/bootstrap-treeview.min.js" ></script>





<script>
    var PROJECTID, TASKTYPE, TASKPHASE,  PERSONID
    !function () {
        laydate.skin('danlan');//切换皮肤，请查看skins下面皮肤库
        laydate({ elem: '#registrantTiem' });//绑定元素
        laydate({ elem: '#endingDate' });
        
    }();
   
</script>

<script type="text/javascript">

function oper(){
	
	layer.open({
        type: 1,
        title: '部门列表',
        shadeClose: false,
        shade: 0.5,
        skin: 'layui-layer-rim',
//        maxmin: true,
        area: ['20%', '50%'],
        shadeClose: false,
        content: $("#open_department")
        //iframe的url
    });
	

}


</script> 
<script type="text/javascript">
$(function(){
	var init = function(data){
		return $("#div").treeview({
			data:data,
			color:"#428bca",
			levels:2,
			onNodeSelected:function(){//点击某个节点触发事件函数
				var arr = $('#div').treeview('getSelected');//获取选择节点的所有数据
		       /*  alert(JSON.stringify(arr)); */
		        for (var key in arr) {
		           /*  alert(arr[key].text); *///获取部门名称
		            document.getElementById("rt_oz_name").value = arr[key].text;//绑定部门
		            layer.closeAll();
		        }
			},
		});
	}
	init('${menus}')
})

</script>
</html>